const formatTime = date => {
  const hour = date.getHours()
  //返回要的到的时间，并设置格式
  return [hour].map(formatNumber);
}

const formatNumber = n => {
  n = n.toString()
  return n[1] ? n : '0' + n
}

module.exports = {
  formatTime: formatTime
}
